package com.whfc.fmam.entity.enums;

/**
 * @Description: 磅单收发料类型
 * @author: qzexing
 * @version: 1.0
 * @date: 2020/4/24 11:50
 */
public enum WeighNoteRecvSendType {

    PURCHASE(101, "采购"),

    ENTER(102, "调入"),

    SUPPLY(103, "甲供"),

    SEND(201, "发料"),

    WASTE(202, "废旧物资"),

    OUTER(203, "调出"),

    SOLD(204, "售出"),

    INSTANT(301, "直入直出");


    private Integer value;

    private String desc;

    WeighNoteRecvSendType(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static WeighNoteRecvSendType parseValue(Integer value) {
        switch (value) {
            case 101:
                return PURCHASE;
            case 102:
                return ENTER;
            case 103:
                return SUPPLY;
            case 201:
                return SEND;
            case 202:
                return WASTE;
            case 203:
                return OUTER;
            case 204:
                return SOLD;
            case 301:
                return INSTANT;
            default:
                return null;
        }
    }

}
